﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'GetAqluilerByFecha')
	BEGIN
		DROP  Procedure  GetAqluilerByFecha
	END

GO

CREATE Procedure GetAqluilerByFecha

	(
		@fecha datetime
	)

AS

BEGIN
	SET NOCOUNT ON
	
	SELECT TOP(1)
	[Cantidad],
	[Comentarios],
	[Fecha],
	[IdBien],
	[IdProveedor],
	[IdVehiculoAlquilado]
	FROM [AlquilerVehiculo] 
	WHERE [Fecha] = @fecha
	ORDER BY [Fecha] ASC

	SET NOCOUNT OFF
END

GO


GRANT EXEC ON GetAqluilerByFecha TO PUBLIC

GO


